package com.book.anno;

/**
 * @author SuperYu  2024/8/13
 */
public class TestAnnotation {
    public static void main(String[] args) throws ClassNotFoundException {

        Class<?> aClass = Class.forName("com.book.anno.Father");
        //
        // boolean f = aClass.isAnnotationPresent(MyAnnotation.class);
        // System.out.println(f);

        boolean f = aClass.isAnnotationPresent(Persons.class);
        System.out.println(f);

        if(f){
            Persons annotation = aClass.getAnnotation(Persons.class);
            Person[] arr = annotation.value();
            for (Person p : arr) {
                System.out.println(p.value());
            }
        }



    }
}
